home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr28 / par300.zip / POM.DOC < prev    next >
Text File  |  1995-04-12  |  75KB  |  1,679 lines

  1.  
  2.     ===========================================================================
  3.     ===========================================================================
  4.     ============================                   ============================
  5.     ============================                   ============================
  6.     ============================   PARSE-O-MATIC   ============================
  7.     ============================                   ============================
  8.     ============================                   ============================
  9.     ===========================================================================
  10.     ===========================================================================
  11.                          
  12.                                                                                
  13.     +-------------------------------------------------------------------------+
  14.     |                                                                         |
  15.     |        HERE ARE A FEW OF THE THINGS PARSE-O-MATIC CAN DO FOR YOU:       |
  16.     |                                                                         |
  17.     |      Importing             Exporting             Automated Editing      |
  18.     |      Text Extraction       Data Conversion       Table Lookup           |
  19.     |      Retabulation          Info Weeding          Selective Copying      |
  20.     |      Binary-File to Text   Report Reformatting   Wide-Text Folding      |
  21.     |      Auto-Batch Creation   Comm-log Trimming     Tab Replacement        |
  22.     |      Character Filtering   Column Switching      DBF Interpretation     |
  23.     |      De-uppercasing        Name Properization    And much more!         |
  24.     |                                                                         |
  25.     |      "Parse-O-Matic is a wonderful time saver .... Each report that     |
  26.     |      I can convert from our ... accounting system saves our company     |
  27.     |      about 500 man hours per year" -- R. Brooker (a happy POM user)     |
  28.     |                                                                         |
  29.     +-------------------------------------------------------------------------+
  30.  
  31.  
  32.                    Parse-O-Matic is Copyright (C) 1992, 1995 by:
  33.  
  34.            Pinnacle Software, CP 386 Mount Royal, Quebec, Canada H3P 3C6
  35.            U.S. Office: Box 714 Airport Road, Swanton, Vermont 05488 USA
  36.  
  37.                        Support Line: (514) 345-9578
  38.                      Free Files BBS: (514) 345-8654
  39.                      Internet email: pinnacl@cam.org
  40.                      World Wide Web: http://www.cam.org/~pinnacl
  41.                          CompuServe: 70154,1577
  42.  
  43.  
  44.     +-------------------------------------------------------------------------+
  45.     |                                                                         |
  46.     |           FILE FORMATS CURRENTLY SUPPORTED BY PARSE-O-MATIC:            |
  47.     |                                                                         |
  48.     |   Input: Text (almost any format), Binary, Fixed-Length, DBF            |
  49.     |  Output: Text (flat, comma-delimited, paginated), Binary, Fixed-Length  |
  50.     |                                                                         |
  51.     +-------------------------------------------------------------------------+
  52.  
  53.  
  54.  
  55.     ===========================================================================
  56.                              AN OVERVIEW OF THIS MANUAL
  57.     ===========================================================================
  58.  
  59.  
  60.     INTRODUCTION . . . . . . . . Why you need Parse-O-Matic -- an example
  61.                                  Parse-O-Matic to the rescue!
  62.                                  How it works
  63.  
  64.     FUNDAMENTALS . . . . . . . . The Parse-O-Matic command
  65.                                  The POM file
  66.                                  Padding for clarity
  67.  
  68.     QUICK REFERENCE  . . . . . . Related commands
  69.                                  Command formats
  70.  
  71.     COMMAND WORDS  . . . . . . . SET
  72.                                  IF
  73.                                  PARSE
  74.                                  BEGIN and END
  75.                                  OUT and OUTEND
  76.                                  OUTHDG and PAGELEN
  77.                                  MINLEN
  78.                                  IGNORE and ACCEPT
  79.                                  TRIM and PAD
  80.                                  CHANGE
  81.                                  PROPER
  82.                                  INSERT
  83.                                  APPEND
  84.                                  SPLIT and CHOP
  85.                                  LOOKUP, LOOKFILE, LOOKCOLS and LOOKSPEC
  86.                                  TRACE
  87.  
  88.     TERMS AND TECHNIQUES . . . . Values
  89.                                  Delimiters
  90.                                  Illegal characters
  91.                                  Comparators
  92.                                  Incrementing
  93.                                  Line counters
  94.                                  Tracing
  95.                                  Quiet mode
  96.                                  DBF Files
  97.                                  Converting comma-delimited files
  98.                                  Examples
  99.  
  100.     LICENSING  . . . . . . . . . Shareware evaluation copy
  101.                                  Registered copy
  102.                                  Site and Multi-copy licenses
  103.                                  Distribution license
  104.                                  Retail license
  105.  
  106.  
  107.  
  108.     ===========================================================================
  109.                                     INTRODUCTION
  110.     ===========================================================================
  111.  
  112.  
  113.     Parse-O-Matic is a programmable file-parser.  Simple enough for even a non-
  114.     programmer to master, it can help out in countless ways.  Here are some of
  115.     the things Parse-O-Matic can do:  Importing, Exporting, Automated Editing,
  116.     Text Extraction, Data Conversion, Table Lookup, Retabulation, Info Weeding,
  117.     Selective Copying, Binary-File to Text, Tab Replacement, Reformatting,
  118.     Wide-Text Folding, Auto-Batch Creation, Character Filtering, Column
  119.     Switching, DBF Interpretation, Report Generation, and more!
  120.  
  121.     If you have a file you want to edit, manipulate, or change around, you may
  122.     find that Parse-O-Matic is just the tool you need.  Parse-O-Matic is not,
  123.     however, an "automatic file converter".  It will not, for example, convert
  124.     WordPerfect files to MS-Word format, or convert Lotus 1-2-3 Spreadsheets
  125.     DIRECTLY to Excel files (although you CAN use Parse-O-Matic as an
  126.     intermediary, by having it read reports from one program and convert them
  127.     to comma-delimited files which can be imported by the other program.)
  128.  
  129.  
  130.                       ----------------------------------------
  131.                       WHY YOU NEED PARSE-O-MATIC -- AN EXAMPLE
  132.                       ----------------------------------------
  133.  
  134.     There are plenty of programs out there that have valuable data locked away
  135.     inside them.  How do you get that data OUT of one program and into another
  136.     one?
  137.  
  138.     Some programs provide a feature which "exports" a file into some kind of
  139.     generic format.  Perhaps the most popular of these formats is known as a
  140.     "comma-delimited file", which is a text file in which each data field is
  141.     separated by a comma.  Character strings -- which might themselves contain
  142.     commas -- are surrounded by double quotes.  So a few lines from a
  143.     comma-delimited file might look something like this (an export from a
  144.     hypothetical database of people who owe your company money):
  145.  
  146.     +-------------------------------------------------------------------------+
  147.     |      "JONES","FRED","1234 GREEN AVENUE", "KANSAS CITY", "MO",293.64     |
  148.     |      "SMITH","JOHN","2343 OAK STREET","NEW YORK","NY",22.50             |
  149.     |      "WILLIAMS","JOSEPH","23 GARDEN CRESCENT","TORONTO","ON",16.99      |
  150.     +-------------------------------------------------------------------------+
  151.  
  152.     Unfortunately, not all programs export or import data in this format.
  153.     Even more frustrating is a program that exports data in a format that is
  154.     ALMOST what you need!
  155.  
  156.     If that's the case, you might decide to spend a few hours in a text editor,
  157.     modifying the export file so that the other program can understand it.  Or
  158.     you might write a program to do the editing for you.  Both solutions are
  159.     time-consuming.
  160.  
  161.     An even more challenging problem arises when a program which has no export
  162.     capability does have the ability to "print" reports to a file.  You can
  163.     write a program to read these files and convert them to something you can
  164.     use, but this can be a LOT of work!
  165.  
  166.  
  167.                             ----------------------------
  168.                             PARSE-O-MATIC TO THE RESCUE!
  169.                             ----------------------------
  170.  
  171.     Parse-O-Matic is a utility that reads text, fixed-record-length and DBF
  172.     ("DBase") files, interprets the data, and outputs the result to a text,
  173.     fixed-length or binary file.  It can help you "boil down" reports into
  174.     their essential data.  You can also use it to convert NEARLY compatible
  175.     import files, or generate printable reports.
  176.  
  177.  
  178.                                     ------------
  179.                                     HOW IT WORKS
  180.                                     ------------
  181.  
  182.     You need three things:
  183.  
  184.     1) The Parse-O-Matic program
  185.     2) A Parse-O-Matic "POM" file (to tell Parse-O-Matic what to do)
  186.     3) The input file
  187.  
  188.     The input file is usually a report from another program, a fixed record
  189.     length data file, or a DBF ("DBase") file.  We've provided several examples
  190.     of typical input files. For example, the file XMPDAT02.TXT comes from the
  191.     AccPac accounting software.  AccPac is a great program, but its export
  192.     capabilities leave something to be desired.  Parse-O-Matic can help!
  193.  
  194.     To see detailed demonstrations of how these files can be parsed, enter
  195.     START at the DOS prompt, then select EXAMPLES.
  196.  
  197.  
  198.  
  199.     ===========================================================================
  200.                                     FUNDAMENTALS
  201.     ===========================================================================
  202.    
  203.  
  204.     This documentation assumes that you are an experienced computer user.  If
  205.     you have trouble, you might ask a programmer to help you -- POM file
  206.     creation is a little like programming!
  207.                           
  208.  
  209.                              -------------------------
  210.                              THE PARSE-O-MATIC COMMAND
  211.                              -------------------------
  212.  
  213.     The basic format of the Parse-O-Matic command line is:
  214.  
  215.         POM pom-file input-file output-file
  216.  
  217.     Here is an example, as you would type it at the DOS command line:
  218.  
  219.         POM POMFILE.POM REPORT.TXT OUTPUT.TXT
  220.  
  221.     For a more formal description of the command line, start up POM by typing
  222.     this command at the DOS prompt:
  223.  
  224.         POM
  225.  
  226.                                     ------------
  227.                                     THE POM FILE
  228.                                     ------------
  229.  
  230.     The POM file is a text file with a .POM extension.  The following
  231.     conventions are used when interpreting the POM file:
  232.  
  233.     - Null lines and lines starting with a semi-colon (comments) are ignored.
  234.  
  235.     - A POM file may contain up to 500 lines of specifications.
  236.       Comment lines do not count in this total.
  237.  
  238.     A POM file contains no "loops" (to use the programming term).  Each line of
  239.     the input file is processed by the entire POM file.  If you'd like this
  240.     expressed in terms of programming languages, here's what POM does:
  241.  
  242.     +-------------------------------------------------------------------------+
  243.     |      START: If there's nothing left in the input file, go to QUIT.      |
  244.     |             Read a line from the input file                             |
  245.     |             Do everything in the POM file                               |
  246.     |             Go to START                                                 |
  247.     |      QUIT:  Tell the user you're finished!                              |
  248.     +-------------------------------------------------------------------------+
  249.  
  250.  
  251.                                 -------------------
  252.                                 PADDING FOR CLARITY
  253.                                 -------------------
  254.  
  255.     Spaces and tabs between the words and variables in a POM file line are
  256.     generally ignored (except in the case of the "output picture" of the OUT
  257.     and OUTEND commands).  You can use spaces to make your POM files easier to
  258.     read.
  259.  
  260.     Additionally, in any line in the POM file, the following terms are ignored:
  261.  
  262.         THEN   ELSE
  263.  
  264.     Finally, the equals ("=") character is ignored if it is found in a place
  265.     where no comparison is taking place.  This will be demonstrated below.
  266.  
  267.     You can use these techniques to make your POM files easier to read.  For
  268.     example, the IF command can be written in several ways:
  269.  
  270.         Very terse:          IF PRICE = "0.00" BONUS "0.00" "1.00"
  271.  
  272.         Padded with spaces:  IF PRICE = "0.00"   BONUS   "0.00"   "1.00"
  273.  
  274.         Fully padded:        IF PRICE = "0.00" THEN BONUS = "0.00" ELSE "1.00"
  275.  
  276.     In the last example, the first equals sign ("=") is a "comparator".  (For
  277.     details about comparators, see the section entitled "Comparators".)  The
  278.     second equals sign is not really required, but it does make the line easier
  279.     to understand.
  280.  
  281.  
  282.  
  283.     ===========================================================================
  284.                                   QUICK REFERENCE
  285.     ===========================================================================
  286.  
  287.  
  288.                                   ----------------
  289.                                   Related Commands
  290.                                   ----------------
  291.  
  292.     For ease of learning, the "Command Words" section explains each command in
  293.     the following order:
  294.  
  295.  
  296.     COMMANDS WHICH WILL...              LIST OF COMMANDS
  297.     ----------------------------------  ------------------------------------
  298.  
  299.     Break up an input line into fields  SET IF PARSE
  300.  
  301.     Control processing flow             BEGIN END
  302.  
  303.     Generate or control output          OUT OUTEND OUTHDG PAGELEN
  304.  
  305.     Accept or reject input              MINLEN IGNORE ACCEPT
  306.  
  307.     Alter fields                        TRIM PAD CHANGE PROPER INSERT APPEND
  308.  
  309.     Preprocess input                    SPLIT CHOP
  310.  
  311.     Look up data in another file        LOOKUP LOOKFILE LOOKCOLS LOOKSPEC
  312.  
  313.     Trace processing                    TRACE
  314.  
  315.  
  316.                                   ---------------
  317.                                   Command Formats
  318.                                   ---------------
  319.  
  320.     Here is a quick-reference table of all the commands.  The following conven-
  321.     tions are used in the table:
  322.  
  323.     "var"   means a variable that is being set.
  324.     "c"     means a comparator (if omitted, defaults to "equals")
  325.     "value" means a variable whose value is being read.
  326.     Square brackets [like this] indicate optional items.
  327.                   
  328.     -------------------------------------------  ------------------------------
  329.     COMMAND FORMATS                              EXAMPLE
  330.     ===========================================  ==============================
  331.     SET      var value                           SET     name $FLINE[20 26]
  332.     IF       value c value var value [value]     IF      x = "Y" THEN z = "N"
  333.     PARSE    var value from to [control]         PARSE   x $FLINE "2*(" "3*)"
  334.     -------------------------------------------  ------------------------------
  335.     BEGIN    value c value                       BEGIN   linecntr < "3"
  336.     END                                          END
  337.     -------------------------------------------  ------------------------------
  338.     OUT      [value c value] |output-picture     OUT     z = "X" |{price}
  339.     OUTEND   [value c value] |output-picture     OUTEND  z = "X" |{$FLINE}
  340.     OUTHDG   value                               OUTHDG  "LIST OF EMPLOYEES"
  341.     PAGELEN  value [value]                       PAGELEN "66" "N"
  342.     -------------------------------------------  ------------------------------
  343.     MINLEN   value                               MINLEN  "15"
  344.     IGNORE   value c value                       IGNORE  price = "0.00"
  345.     ACCEPT   value c value                       ACCEPT  $FLINE[1 3] = "YES"
  346.     -------------------------------------------  ------------------------------
  347.     TRIM     var spec character                  TRIM    price "R" "$"
  348.     PAD      var spec character len              PAD     serialnum "L" "0" "10"
  349.     CHANGE   var value value                     CHANGE  date "/" "-"
  350.     PROPER   var [methods [exceptions-file]]     PROPER  custname "IS" "XY.PEF"
  351.     INSERT   var spec value                      INSERT  price "L" "$"
  352.     APPEND   var value value [value [value]]     APPEND  name first last
  353.     -------------------------------------------  ------------------------------
  354.     SPLIT    from to [,from to] [...]            SPLIT   1 250, 251 300
  355.     CHOP     from to [,from to] [...]            CHOP    1 250, 251 300
  356.     -------------------------------------------  ------------------------------
  357.     LOOKUP   var value                           LOOKUP   phonenum "FRED JONES"
  358.     LOOKFILE value                               LOOKFILE "C:\TABLES\DATA.TBL"
  359.     LOOKCOLS value value value value             LOOKCOLS "1" "3" "8" "255"
  360.     LOOKSPEC value value value                   LOOKSPEC "Y" "N" "N"
  361.     -------------------------------------------  ------------------------------
  362.     TRACE    var                                 TRACE    price
  363.     -------------------------------------------  ------------------------------
  364.     
  365.     The commands are explained in more detail (and in the same order) in the
  366.     "Command Words" section.
  367.  
  368.  
  369.     ===========================================================================
  370.                                    COMMAND WORDS
  371.     ===========================================================================
  372.  
  373.  
  374.                                   ---------------
  375.                                   The SET Command
  376.                                   ---------------
  377.  
  378.     FORMAT:  SET var1 value1
  379.  
  380.     SET assigns a value to a variable.  The usual reason to do this is to set a
  381.     variable from the input line (represented by the variable $FLINE) prior to
  382.     cleaning it up with TRIM. For example, if the input line looked like this:
  383.  
  384.         JOHN       SMITH     555-1234   322 Westchester Lane    Architect
  385.         |          |         |          |                       |
  386.         Column 1   Col 12    Col 22     Col 33                  Col 57
  387.  
  388.     then we could extract the last name from the input line with these two POM
  389.     commands:
  390.  
  391.         SET  NAME = $FLINE[12 21]      (Sets the variable from the input line)
  392.         TRIM NAME  "R"  " "            (Trims any spaces on the right side)
  393.  
  394.     SET would first set the variable NAME to this value:     "SMITH     "
  395.     After the TRIM, the variable NAME would have the value:  "SMITH"
  396.  
  397.     You will also use SET if you plan to include a substring of $FLINE in the
  398.     output, since the OUT and OUTEND commands do not recognize substrings after
  399.     the "|" marker, only complete variables.
  400.  
  401.  
  402.                                    --------------
  403.                                    The IF Command
  404.                                    --------------
  405.  
  406.     FORMAT:  IF value1 [comparator] value2 var1 value3 [value4]
  407.  
  408.     NOTE:    For an explanation of comparators, see the section "Comparators".
  409.              In the following explanation, we will demonstrate the command
  410.              using only the "equals" ("=") comparator.
  411.  
  412.     If value1 equals value2, var1 is set to value3.  Otherwise, it is set to
  413.     value4 (if value4 is missing, nothing is done, and var1 is not changed).
  414.     Here's an example of the IF command...
  415.  
  416.         SET  EARNING = $FLINE[20 23]
  417.         IF   EARNING = "0.00" THEN BONUS = "0.00" ELSE "1.00"
  418.  
  419.     This obtains the value between columns 20 and 26, then checks if it equals
  420.     "0.00".  If it does, the variable BONUS is set to 0.00.  If not, BONUS is
  421.     set to "1.00".
  422.  
  423.     The "THEN" and "ELSE" are "padding" and can be omitted.  For details, see
  424.     the section entitled "Padding for Clarity".
  425.  
  426.  
  427.  
  428.  
  429.                                  -----------------
  430.                                  The PARSE Command
  431.                                  -----------------
  432.  
  433.     FORMAT:  PARSE var1 value1 from to [control]
  434.  
  435.     NOTE:    PARSE is a very powerful command.  As a result, the explanation
  436.              is somewhat complex.  If you are reading this manual for the
  437.              first time, you may wish to skip this part for now, and come
  438.              back to it later.
  439.  
  440.     The PARSE command is used for extracting information from an input line
  441.     that does not have its data in precise columns.  Consider the following
  442.     input file:
  443.  
  444.                       Mouse     Gazelle   Mouse     Elephant
  445.                       Dog       Giraffe   Elk       Mongoose
  446.                       Monkey    Snake     Caribou   Trout
  447.                       |         |         |         |
  448.                       Column 1  Col 11    Col 21    Col 31
  449.  
  450.     Extracting data that is arranged in tidy columns is simple -- all you need
  451.     is the SET command.  However, you will need a more powerful command if the
  452.     data is in "free-form", like this:
  453.  
  454.                             Mouse,Gazelle,Mouse,Elephant
  455.                             Dog,Giraffe,Elk,Mongoose
  456.                             Monkey,Snake,Caribou,Trout
  457.  
  458.     The PARSE command lets you extract the "Nth" item.  For example, to extract
  459.     the third item in each line in the free-form example above, you could use
  460.     this command:
  461.  
  462.         PARSE  xyz  $FLINE  "2*,"  "3*,"
  463.  
  464.     This means "set the variable xyz by looking in $FLINE (the line just read
  465.     from the input file) and taking everything between the second comma and the
  466.     third comma".  For the three lines in the sample input file, the variable
  467.     xyz is set to Mouse, then Elk, then Caribou.
  468.  
  469.     In the "From" specification (i.e. the "2*," part of the command):
  470.  
  471.        2    means "the second occurance"
  472.        *    is a delimiter to mark the end of the occurance number
  473.        ,    is the text you are looking for
  474.  
  475.     Both the "From" and "To" specifications use this format.  Incidentally, the
  476.     text you are looking for can be more than a single character -- it can be
  477.     up to 80 characters long.  Let's say the input file looks like this:
  478.  
  479.                          Mouse:::Gazelle:::Mouse:::Elephant
  480.                          Dog:::Giraffe:::Elk:::Mongoose
  481.                          Monkey:::Snake:::Caribou:::Trout
  482.  
  483.     You can extract the third item in each line with this command:
  484.  
  485.  
  486.            PARSE  xyz  $FLINE  "2*:::"  "3*:::"
  487.                   ___  ______   _ ___    _ ___
  488.                    |     |      |  |     |  |
  489.      Variable to set     |      |  |     |  |
  490.         The value to parse      |  |     |  "To" text being sought
  491.           "From" occurance number  |     "To" occurance number
  492.             "From" text being sought
  493.  
  494.     This command sets the variable xyz to Mouse, then Elk, then Caribou.
  495.  
  496.     The PARSE command is particularly useful for extracting information from
  497.     comma-delimited files.  Here is an example of a comma-delimited file:
  498.  
  499.                         "Mouse","Gazelle","Mouse","Elephant"
  500.                         "Dog","Giraffe","Elk","Mongoose"
  501.                         "Monkey","Snake","Caribou","Trout"
  502.  
  503.     You can extract all the fields with this series of commands (note the use
  504.     of doubled-up quotes to represent a single quotation mark -- see the
  505.     section "Delimiters" for details):
  506.  
  507.         PARSE  field1  $FLINE  "1*"""  "2*"""
  508.         PARSE  field2  $FLINE  "3*"""  "4*"""
  509.         PARSE  field3  $FLINE  "5*"""  "6*"""
  510.         PARSE  field4  $FLINE  "7*"""  "8*"""
  511.  
  512.     For the first line of the sample input file, field1 is set to Mouse, field2
  513.     is set to Gazelle, and so on.
  514.  
  515.     The occurance number is not always needed.  Here are some variations of
  516.     the "From" specification that you might find helpful:
  517.             
  518.         ""      = Start from the first character in the value being parsed
  519.         "XYZ"   = Start from the first "XYZ" found in the value being parsed
  520.  
  521.     Similar variations can be used with the "To" specification:
  522.             
  523.         ""      = End with the last character in the value being parsed
  524.         "XYZ"   = End with the first "XYZ" found in the value being parsed
  525.  
  526.     The occurance number must be between 1 and 255.  The following lines are
  527.     not valid PARSE commands:
  528.  
  529.         PARSE  xyz  $FLINE  "0*,"  "1*,"      (uses 0)
  530.         PARSE  xyz  $FLINE  "1*,"  "256*,"    (uses 256)
  531.  
  532.     The occurance number is always be followed by a "*" so you can search for a
  533.     number.  Consider the following example (the meaning of which would be
  534.     unclear without the "*" delimiter):
  535.  
  536.         PARSE  xyz  "XXX2YYY2ZZZ2"  "1*2"  "2*2"
  537.  
  538.     This sets xyz to the text occuring between the first "2" and the second
  539.     "2".  In other words, xyz is set to "YYY".
  540.  
  541.     If PARSE does not find the search text, or if the "To" text occurs before
  542.     the "From" text, the variable will be set to a null ("").  Here are several
  543.     examples:
  544.  
  545.         PARSE  abc  "ABCDEFGHIJ"  "1*K"  "1*J"     (There is no "K")
  546.         PARSE  abc  "ABCDEFGHIJ"  "1*A"  "1*X"     (There is no "X")
  547.         PARSE  abc  "ABCDEFGHIJ"  "1*J"  "1*A"     ("J" comes after "A")
  548.  
  549.     The PARSE command has an optional "control" parameter, which tells PARSE
  550.     whether to include or exclude the text that was found.  By default (as
  551.     shown in all of the preceding examples), the found text is excluded.
  552.     However, if you want to include the found text, you can add "I" at the end
  553.     of the PARSE command, as in this example:
  554.  
  555.         PARSE  xyz  "aXcaYcaZc"  "2*a"  "2*c"  "I"
  556.  
  557.     This sets the variable xyz to "aYc".  You can also set the control
  558.     specification to "X" (meaning "exclude"), although since this is the
  559.     default setting for PARSE, it really isn't necessary.  Here is an example:
  560.  
  561.         PARSE  xyz  "a1ca2ca3c"  "2*a"  "2*c"  "X"
  562.  
  563.     This sets the variable xyz to "2".
  564.  
  565.     There is one exception to the behaviour of the control setting.  If you
  566.     use the null ("") specification for "From" or "To", the "found" value
  567.     (the first character for "From", or the last character for "To") will
  568.     always be included.  Here is an example:
  569.  
  570.         PARSE  xyz  "ABCABCABC"  ""  "2*C"
  571.  
  572.     This sets the variable xyz to "ABCAB".  The "From" value (i.e. the first
  573.     character) is not excluded.  However, when PARSE finds the "To" value (i.e.
  574.     the second occurance of the letter C) it is excluded.  If you want to
  575.     include the second "C", you should write the command this way:
  576.  
  577.         PARSE  xyz  "ABCABCABC"  ""  "2*C"  "I"
  578.  
  579.     The following two commands accomplish the same thing:
  580.  
  581.         PARSE  xyz  "ABCD"  ""  ""
  582.         SET    xyz  "ABCD"
  583.  
  584.     They are equivalent because the PARSE command means "Set the variable xyz
  585.     with everything between (and including) the first and last character".
  586.  
  587.     The reason that PARSE treats the null ("") specification differently may
  588.     not be immediately obvious, since the examples given here are very simple,
  589.     and not representative of "real world" applications. However, in day-to-day
  590.     usage, you will frequently find it helpful to be able to specify a command
  591.     that says, "Give me everything from the beginning of the line to just
  592.     before such-and-such".
  593.  
  594.     Here is a command that means "Give me everything from just after the dollar
  595.     sign, to the end of the line":
  596.  
  597.         PARSE  xyz  "I'd like to have $250.00"  "1*$"  ""
  598.  
  599.     This sets xyz to "250.00".  If you want to include the dollar sign, write
  600.     the command this way:
  601.  
  602.         PARSE  xyz  "I'd like to have $250.00"  "1*$"  ""  "I"
  603.  
  604.     For more examples of the PARSE command, see the demonstrations provided
  605.     with Parse-O-Matic (type START at the DOS prompt, then select EXAMPLES).
  606.  
  607.  
  608.                              --------------------------
  609.                              The BEGIN and END Commands
  610.                              --------------------------
  611.  
  612.     The format for the BEGIN and END commands is as follows:
  613.  
  614.     BEGIN value1 [comparator] value2
  615.     :
  616.     Dependant code
  617.     :
  618.     END
  619.  
  620.     NOTE:    For an explanation of comparators, see the section "Comparators".
  621.              In the following explanation, we will demonstrate the command
  622.              using only the "equals" ("=") comparator.
  623.  
  624.     If value1 equals value2, then the dependant code (the POM lines between
  625.     the BEGIN and the END) are executed.  If value1 does not equal value2,
  626.     then the dependant code is skipped.
  627.  
  628.     It is traditional in programming to indent code that appears in blocks
  629.     such as Parse-O-Matic's BEGIN/END technique.  This makes the logic of
  630.     the program easier to understand.  For example:
  631.  
  632.     BEGIN datatype = "Employee"
  633.       SET phone    = $FLINE[ 1 10]
  634.       SET address  = $FLINE[12 31]
  635.     END
  636.  
  637.     BEGIN/END blocks can be nested.  That is to say, you can have BEGIN/END
  638.     blocks inside other BEGIN/END blocks.  Here is an example, with arrows
  639.     to indicate the levels of each BEGIN/END block...
  640.  
  641.     BEGIN datatype = "Employee"      <---------------------
  642.       SET phone    = $FLINE[ 1 10]                        |
  643.       SET address  = $FLINE[12 31]                        |
  644.       SET areacode = phone[1 3]                           | First
  645.       BEGIN areacode = "514"         <------- Second      | Level
  646.         SET local = "Y"                     | Level       | Block
  647.         SET tax   = "Y"              <------- Block       |
  648.       END                                                 |
  649.     END                              <---------------------
  650.  
  651.     In this case, the "inner" block (starting with BEGIN areacode = "514") is
  652.     reached only if the "outer" block (BEGIN datatype = "Employee") is true.
  653.     If the outer block is false, the inner block is ignored.
  654.  
  655.     A nested BEGIN/END block must always be completely inside the outer block.
  656.     Study the following (incorrect) example:
  657.  
  658.     BEGIN datatype = "Employee"             <----
  659.       SET phone    = $FLINE[ 1 10]              |  First
  660.       SET areacode = phone[1 3]                 |  Level
  661.       BEGIN areacode = "514"         <---       |  Block?
  662.         SET local = "Y"                 |       |
  663.     END                                 |   <----
  664.       SET tax = "Y"                     |
  665.       END                            <---  Second Level Block?
  666.  
  667.     Parse-O-Matic does not pay attention to the indenting -- it is only a
  668.     tradition we use to make the file easier to read.  The code will be
  669.     understood this way:
  670.  
  671.     BEGIN datatype = "Employee"      <---------------------
  672.       SET phone    = $FLINE[ 1 10]                        | First
  673.       SET areacode = phone[1 3]                           | Level
  674.       BEGIN areacode = "514"         <--- Second          | Block
  675.         SET local = "Y"                 | Level           |
  676.       END                            <--- Block           |
  677.       SET tax = "Y"                                       |
  678.     END                              <---------------------
  679.  
  680.     You can nest BEGIN/END blocks up to 25 deep -- although it is unlikely you
  681.     will ever need that much nesting.  Here is an example of code that uses
  682.     nesting up to three deep:
  683.  
  684.     BEGIN datatype = "Dog"           <----------------------------------
  685.       SET breed = $FLINE[1 10]                                         | First
  686.       BEGIN breed = "Collie"         <-----------------------          | Level
  687.         SET sound = "Woof"                                  | Second   | Block
  688.         BEGIN name = "Spot"          <------ Third          | Level    |
  689.           SET attitude = "Friendly"        | Level          | Block    |
  690.         END                          <------ Block          |          |
  691.       END                            <-----------------------          |
  692.       BEGIN breed = "Other"          <----------------------- Another  |
  693.         SET sound = "Arf"                                   | Second   |
  694.         SET attitude = "Unknown"                            | Level    |
  695.       END                            <----------------------- Block    |
  696.     END                              <----------------------------------
  697.  
  698.     Once again, the indentation is for clarity only and does not affect the
  699.     way the POM file runs.  However, you will find that it makes your POM
  700.     file much easier to understand.
  701.                          
  702.  
  703.                             ---------------------------
  704.                             The OUT and OUTEND Commands
  705.                             ---------------------------
  706.  
  707.     FORMAT:  OUT[END] [value1 [comparator] value2] |output-picture
  708.  
  709.     NOTE:    For an explanation of comparators, see the section "Comparators".
  710.              In the following explanation, we will demonstrate the command
  711.              using only the "equals" ("=") comparator.
  712.  
  713.     The OUT command generates output without an end-of-line (i.e. carriage
  714.     return and linefeed characters).  The OUTEND command generates output and
  715.     also adds an end-of-line.
  716.  
  717.     When value1 equals value2, a line is sent to the output file, according to
  718.     the output picture.  Within the output picture, all text is taken literally
  719.     (i.e. " is taken to mean literally that -- a quotation mark character).
  720.  
  721.     The only exception to this is variable names, which are identified by the
  722.     { and } characters.  For example, a POM file that contained the following
  723.     single line:
  724.  
  725.         OUTEND "X" = "X" |{$FLINE}
  726.  
  727.     would simply output every line from the input file (not very useful!).
  728.  
  729.     The "X" = "X" part of the command is the comparison which controls when
  730.     output occurs.  In the example above, both values being compared are the
  731.     same, so output will always occur.
  732.  
  733.     You can not use substrings after the "|" marker.  Thus, the following line
  734.     is NOT legal:
  735.  
  736.         OUTEND $FLINE[1 3] = "IBM" |{$FLINE[1 15]}
  737.  
  738.     The correct way to code this is as follows:
  739.  
  740.         SET CODE = $FLINE[1 15]
  741.         OUTEND $FLINE[1 3] = "IBM" |{CODE}
  742.  
  743.     This outputs the first 15 characters of any line that contains the letters
  744.     "IBM" in the first three positions.
  745.  
  746.  
  747.                           -------------------------------
  748.                           The OUTHDG and PAGELEN Commands
  749.                           -------------------------------
  750.  
  751.     FORMAT:  OUTHDG value1
  752.     FORMAT:  PAGELEN value1 [value2]
  753.  
  754.     OUTHDG is used to place text headers in your output.  For example, if you
  755.     were parsing data to create an employee report, you might use OUTHDG like
  756.     this:
  757.  
  758.         SET EMPNUM = $FLINE[ 1  5]
  759.         SET NAME   = $FLINE[10 28]
  760.         SET PHONE  = $FLINE[30 45]
  761.         OUTHDG "EMPL#  NAME                PHONE NUMBER"
  762.         OUTHDG "-----  ------------------- ------------"
  763.         OUTEND |{EMPNUM} {NAME} {PHONE}
  764.  
  765.     The value following the OUTHDG command is sent to the output file only
  766.     once.  That is to say, after an OUTHDG sends a value to the output file,
  767.     subsequent encounters with that OUTHDG command are ignored -- unless the
  768.     PAGELEN command is used.
  769.  
  770.     The PAGELEN command specifies the length of the output page.  Lines from
  771.     both OUTHDG and OUTEND are counted.  The default value for page length is
  772.     zero, which means that the output is a single page of infinite length.  As
  773.     such, OUTHDG headings appear only the first time they are encountered.
  774.  
  775.     If you specify a page length greater than zero, OUTHDG headings become
  776.     re-enabled once the specified number of output lines have been generated.
  777.     A typical value is as follows:
  778.  
  779.         PAGELEN "55"
  780.  
  781.     This is an ideal page length for most laser printers.  Dot matrix printers
  782.     typically use a page length of 66.
  783.  
  784.     Parse-O-Matic inserts a "form feed" (ASCII 12) character between pages.
  785.     You can turn this off, however, by specifying the page length this way:
  786.  
  787.         PAGELEN "66" "N"
  788.  
  789.     The "N" specification means, "No, don't use form feeds".  Another
  790.     acceptable value is "Y", meaning "Yes, use form feeds", but since this is
  791.     the default, you do not have to specify it.
  792.  
  793.  
  794.                                  ------------------
  795.                                  The MINLEN Command
  796.                                  ------------------
  797.  
  798.     FORMAT:  MINLEN value1
  799.  
  800.     MINLEN specifies the minimum length a line must be to be considered for
  801.     parsing.  If you omit the MINLEN command, the minimum length is assumed to
  802.     be 1.  That is to say, all lines 1 character or longer will be processed
  803.     and shorter lines (null lines in other words) will be ignored.
  804.  
  805.     MINLEN is useful for ignoring brief information lines that clutter up a
  806.     report that you are parsing.  For example, in the sample file EXAMPL02.POM,
  807.     the MINLEN command is set to 85 to ensure that all lines shorter than 85
  808.     characters long will be ignored.  This simplifies the coding considerably.
  809.  
  810.     The longest allowable input line is 255 characters, unless you use the
  811.     SPLIT or CHOP command (described later).
  812.                               
  813.  
  814.                                  ------------------
  815.                                  The IGNORE Command
  816.                                  ------------------
  817.  
  818.     FORMAT:  IGNORE value1 [comparator] value2
  819.  
  820.     NOTE:    For an explanation of comparators, see the section "Comparators".
  821.              In the following explanation, we will demonstrate the command
  822.              using only the "equals" ("=") comparator.
  823.  
  824.     When value1 contains value2, the input line is ignored and all further
  825.     processing on the input line stops.  The usual format of this command is as
  826.     in this example:
  827.  
  828.         IGNORE $FLINE[3 9] = "Date"
  829.  
  830.     This skips any input line that contains the word "Date" between columns 3
  831.     and 9 ($FLINE is the line just read from the input file).
  832.                               
  833.  
  834.                                  ------------------
  835.                                  The ACCEPT Command
  836.                                  ------------------
  837.  
  838.     FORMAT:  ACCEPT value1 [comparator] value2
  839.  
  840.     NOTE:    For an explanation of comparators, see the section "Comparators".
  841.              In the following explanation, we will demonstrate the command
  842.              using only the "equals" ("=") comparator.
  843.  
  844.     The ACCEPT command accepts the input line if value1 contains value2.  For
  845.     example, if the entire POM file read as follows:
  846.  
  847.         ACCEPT $FLINE[15 17] = "YES"
  848.         OUTEND "X" = "X" |{$FLINE}
  849.  
  850.     then any input line that contains "YES" starting in column 15 is sent to
  851.     the output file.  All other lines are ignored.
  852.  
  853.     CLUSTERED ACCEPTS: Sometimes you have to check more than one value to see
  854.     if the input line is valid.  You do this by using "clustered ACCEPTs",
  855.     which are several ACCEPT commands in a row.
  856.  
  857.     Briefly stated, if you have several ACCEPTs in a row ("clustered"), they
  858.     are all processed to determine if the input line is acceptable or not.  If
  859.     even one ACCEPT matches up, the line is accepted.  To express this in more
  860.     detail...
  861.  
  862.     When value1 contains value2, the line is accepted, and processing of the
  863.     POM file continues for that input line, even if the immediately following
  864.     ACCEPTs do NOT produce a match.  After all, we've already got a match!
  865.  
  866.     If value1 does NOT contain value2, Parse-O-Matic looks at the next commmand
  867.     in the POM file.  If it is not another ACCEPT, the input line is ignored.
  868.     If it is another ACCEPT, maybe it will product a match -- so Parse-O-Matic
  869.     moves to that command.
  870.  
  871.     The following POM file uses clustered ACCEPTs to accept any line that
  872.     contains the name "FRED" or "MARY" between columns 5 and 8, or contains the
  873.     word "MEMBER" between columns 20 and 25.
  874.  
  875.         SET    NAME = $FLINE[5 8]         (Set the variable)
  876.         ACCEPT NAME = "FRED"              (Look for FRED)
  877.         ACCEPT NAME = "MARY"              (Look for MARY)
  878.         ACCEPT $FLINE[20 25] = "MEMBER"   (Look for MEMBER)
  879.         OUTEND "X" = "X" |{$FLINE}        (Output the line if we get this far)
  880.  
  881.     The following example will NOT work, however:
  882.  
  883.         ACCEPT $FLINE[20 25] = "MEMBER"
  884.         SET    NAME = $FLINE[5 8]
  885.         ACCEPT NAME = "FRED"
  886.         ACCEPT NAME = "MARY"
  887.         OUTEND "X" = "X" |{$FLINE}
  888.  
  889.     It will not work because the ACCEPTs are not clustered; if the first ACCEPT
  890.     fails, the input line is rejected as soon as the SET command is
  891.     encountered.  The next two ACCEPTs are not reached in such case.
  892.                                
  893.  
  894.                                   ----------------
  895.                                   The TRIM Command
  896.                                   ----------------
  897.  
  898.     FORMAT:  TRIM var1 spec1 character
  899.  
  900.     TRIM removes characters from var1.  This is usually used to remove blanks.
  901.  
  902.     spec1 can be:  A=All   B=Both ends   L=Left side only   R = Right side only
  903.  
  904.     For example:
  905.  
  906.         SET  PRICE = $FLINE[20 26]
  907.         TRIM PRICE "A" ","
  908.         TRIM PRICE "L" "$"
  909.  
  910.     This removes all commas from the variable "PRICE", and removes the leading
  911.     dollar sign.  Thus:
  912.  
  913.         If the input contains the string:   "$25,783"
  914.         The first TRIM changes it to:       "$25783"
  915.         The second TRIM changes it to:      "25783"
  916.                                
  917.  
  918.                                   ---------------
  919.                                   The PAD Command
  920.                                   ---------------  
  921.  
  922.     FORMAT:  PAD var1 spec1 character len
  923.  
  924.     PAD makes var1 a specified length, padded with a specified character.
  925.  
  926.         spec1      is "L", "R", or "C" (Left, Right or Center)
  927.         character  is the character used to pad the string
  928.         len        is the desired string length
  929.  
  930.     For example, if the variable ABC is set to "1234" ...
  931.  
  932.     PAD ABC "L" "0" "7"   left-pads it 7 characters wide with zeros ("0001234")
  933.     PAD ABC "R" " " "5"   right-pads it 5 characters wide with spaces ("1234 ")
  934.     PAD ABC "C" "*" "8"   centers it, 8 wide, with asterisks ("**1234**")
  935.  
  936.     If the length is less than the length of the string, it is unchanged.  For
  937.     example, if you set variable XYZ to "PINNACLE", then
  938.  
  939.         PAD XYZ "R" " " "3"
  940.  
  941.     leaves the string as-is ("PINNACLE").
  942.  
  943.     Thus, PAD can not be used to shorten a string.  If it is your intention to
  944.     make XYZ 3 letters long, you can use the SET command:
  945.  
  946.         SET XYZ = XYZ[1 3]
  947.  
  948.  
  949.                                  ------------------
  950.                                  The CHANGE Command
  951.                                  ------------------
  952.  
  953.     FORMAT:  CHANGE var1 value1 value2
  954.  
  955.     The CHANGE command replaces ALL occurances of value1 with value2.  This is
  956.     more powerful than TRIM, but is not as efficient.  Here is an example of
  957.     the CHANGE command in action:
  958.  
  959.         SET    DATE = $FLINE[31 38]
  960.         CHANGE DATE "/" "--"
  961.  
  962.     If the SET command assigns DATE the value:    "93/10/15"
  963.     Then the CHANGE command converts it to:       "93--10--15"
  964.  
  965.  
  966.                                  ------------------
  967.                                  The PROPER Command
  968.                                  ------------------
  969.  
  970.     FORMAT:  PROPER var1 [methods [exceptions-file]]
  971.  
  972.     The PROPER command converts uppercase text (LIKE THIS) to mixed-case text
  973.     (Like This).  This is useful when you have a list of names of people and
  974.     addresses.  You can also use PROPER to change text that has been typed
  975.     in uppercase into normal text, with capital letters at the beginning of
  976.     sentences.
  977.  
  978.     The simplest way to convert a variable is as follows:
  979.  
  980.         PROPER CustName
  981.  
  982.     If CustName contains "JOHN SMITH", it will be changed to "John Smith".
  983.  
  984.     The conversion routine is fairly intelligent.  For example, if it is
  985.     converting the words "JAGUAR XJS", it can tell that XJS is not a word
  986.     (since it does not contain any vowels) and so the the end result will
  987.     be "Jaguar XJS".  Other "strange-looking" items such as serial numbers
  988.     can often be recognized by the PROPER command, and left untouched.
  989.  
  990.     Nevertheless, it is impossible to handle all situations, so the PROPER
  991.     command supports a "Properization Exceptions File" (known as a PEF file).
  992.     A PEF file lists unusual combinations of letters (typically abbreviations,
  993.     such as Dr.).  The Parse-O-Matic package includes a file named GENERIC.PEF,
  994.     which you may find helpful.  You can view it with the SEE program provided
  995.     with Parse-O-Matic.
  996.  
  997.     A PEF file is prepared with a text editor and contains one "exception" per
  998.     line.  Null or blank lines, or lines that start with a semicolon, are
  999.     ignored.  The longest word that can be specified is 255 characters.
  1000.     Spaces are permitted, but leading and trailing spaces and tabs are ignored.
  1001.  
  1002.     To use the PEF file in your PROPER command, place the file name after the
  1003.     variable name and method setting.  For example:
  1004.  
  1005.         PROPER CustName "W" "GENERIC.PEF"
  1006.  
  1007.     The "W" is the method setting (explained later).  "GENERIC.PEF" is the name
  1008.     of the PEF file.  When Parse-O-Matic looks for the PEF file, it looks first
  1009.     in the current directory.  If it can not find it there, it looks in the
  1010.     directory where POM.EXE is located.  You can, if you wish, specify a
  1011.     complete path to the file, as in this example:
  1012.  
  1013.         PROPER Address "W" "C:\MYFILES\MYPEF.XYZ"
  1014.  
  1015.     If you don't need an exceptions file, you should not use it, since it slows
  1016.     down processing somewhat.  Needless to say, the more items you have in the
  1017.     PEF file, the more it slows down processing.
  1018.  
  1019.     The method setting allows you to specify what PROPER does.  There are
  1020.     several kinds of controls, as follows:
  1021.  
  1022.     METHOD   DESCRIPTION
  1023.     ------   -----------
  1024.       I      Intelligent determination of non-words
  1025.       S      Upcase the first character of each sentence
  1026.       U      Upcase the first alphanumeric character of the line
  1027.       W      Upcase the first letter of each word
  1028.  
  1029.     The default method setting is "IW", so if you omit the method setting, or
  1030.     specify a null setting (e.g. PROPER CustName "" "XYZ.PEF"), PROPER will
  1031.     upcase non-words, and the first letter of each word.
  1032.  
  1033.     NOTE:  If you specify a PEF file, you must also specify a method setting,
  1034.     even if it is null.  The line PROPER "GENERIC.PEF" would not be understood
  1035.     by Parse-O-Matic.  The correct format would be:  PROPER "" "GENERIC.PEF"
  1036.  
  1037.     The examples provided with Parse-O-Matic demonstrate some ways you can use
  1038.     the PROPER command.  To see the examples, enter START at the DOS prompt,
  1039.     then select EXAMPLES.
  1040.  
  1041.  
  1042.                                  ------------------
  1043.                                  The INSERT Command
  1044.                                  ------------------
  1045.  
  1046.     FORMAT:  INSERT var1 spec1 value1
  1047.  
  1048.     The INSERT command inserts text on the left or right of var1, or at a
  1049.     "found text" position.
  1050.  
  1051.         spec1  is "L" or "R" (Left or Right) or a find-string (e.g.  "@HELLO")
  1052.         value1 is the value to be inserted
  1053.  
  1054.     For example, if the variable ABC is set to "Parse-O-Matic", then
  1055.  
  1056.         INSERT ABC "L" "Register "    sets ABC to "Register Parse-O-Matic"
  1057.         INSERT ABC "R" " is super"    sets set ABC to "Parse-O-Matic is super"
  1058.  
  1059.     You can use a find-string to insert text at the first occurance of the text
  1060.     you specify.  For example:
  1061.  
  1062.         INSERT ABC "@-O-Matic" "!"    sets ABC to "Parse!-O-Matic"
  1063.  
  1064.     If the find-string is not found, nothing is done.
  1065.  
  1066.     For an alternative to INSERT, see the APPEND command.
  1067.  
  1068.  
  1069.                                  ------------------
  1070.                                  The APPEND Command
  1071.                                  ------------------
  1072.  
  1073.     FORMAT:  APPEND var1 value1 value2 [value3 [value4]]
  1074.  
  1075.     The APPEND command concatenates (adds together) two or more values and
  1076.     places the result in var1.  For example:
  1077.  
  1078.         APPEND xyz "AB" "CD" "EF" "GHIJ"
  1079.  
  1080.     This command sets the variable xyz to "ABCDEFGHIJ".
  1081.  
  1082.     The third and fourth values (value3 and value4 in the FORMAT shown above)
  1083.     are optional.  Thus, you can use APPEND with only two values.  For example:
  1084.  
  1085.         SET    x1 = "AB"
  1086.         SET    x2 = "CD"
  1087.         APPEND x3 x1 x2
  1088.  
  1089.     This sets the variable x3 to "ABCD".  You can concatenate a maximum of four
  1090.     values with a single APPEND command.  If you require additional concaten-
  1091.     ations, you can use more APPEND commands:
  1092.  
  1093.         APPEND myvar "ABC" "DEF" "GHI" "JKL"
  1094.         APPEND myvar myvar "MNO" "PQR"
  1095.  
  1096.     The first line sets the variable myvar to "ABCDEFGHIJKL".  The second line
  1097.     set myvar to its previous value, plus "MNOPQR", so that its final value is
  1098.     "ABCDEFGHIJKLMNOPQR".
  1099.  
  1100.     NOTE:  No variable can hold more than 255 characters.
  1101.  
  1102.  
  1103.                                  -----------------
  1104.                                  The SPLIT Command
  1105.                                  -----------------
  1106.  
  1107.     FORMAT:  SPLIT from-position to-position [,from-pos'n to-pos'n] [...]
  1108.  
  1109.     The maximum length of an input line from a text file is 255 characters.  If
  1110.     your input file is wider than that, you must break up the file into
  1111.     manageable chunks, using the SPLIT command.  This command lets you specify
  1112.     the way in which each input line is broken up so that it will look like
  1113.     several SEPARATE lines.
  1114.  
  1115.     For example, if your input lines were up to 300 characters wide, you could
  1116.     specify:
  1117.  
  1118.         SPLIT 1 255, 256 300
  1119.  
  1120.     This breaks up each line as if it was two lines.  (If some of the lines are
  1121.     less than 256 characters, they will still be treated as two lines, although
  1122.     the second line will be null (i.e. empty).)
  1123.  
  1124.     You can specify up to 100 splits (use multiple SPLIT commands if
  1125.     necessary).  With SPLIT, Parse-O-Matic can handle input records of up to
  1126.     32767 characters.
  1127.  
  1128.     The best way of handling SPLIT or CHOPped files is to use a combination of
  1129.     $SPLIT (explained in more detail later) and BEGIN/END.  For example:
  1130.  
  1131.         SPLIT 1 250, 251 300
  1132.         BEGIN $SPLIT = "1"
  1133.           SET a = $FLINE[ 1 10]
  1134.           SET b = $FLINE[11 20]
  1135.         END
  1136.         BEGIN $SPLIT = "2"
  1137.           SET x = $FLINE[ 1 10]
  1138.           SET y = $FLINE[11 20]
  1139.           OUTEND |{a} {b} {x} {y}
  1140.         END
  1141.  
  1142.     This outputs the data which appears (in the input file) in columns 1-10,
  1143.     11-20, 251-260 and 261-280.
  1144.  
  1145.  
  1146.                                   ----------------
  1147.                                   The CHOP Command
  1148.                                   ----------------
  1149.  
  1150.     FORMAT:  CHOP from-position to-position [,from-pos'n to-pos'n] [...]
  1151.  
  1152.     The CHOP command works the same way as the SPLIT command, with one
  1153.     exception:  it informs Parse-O-Matic that the input is a fixed-record-
  1154.     length file. In other words, it means that the input records are
  1155.     distinguished by having a particular (and exact) length, rather than being
  1156.     separated by end-of-line characters (Carriage Return, Linefeed) as is the
  1157.     case for a standard text file.
  1158.  
  1159.     Thus, if you have an input file containing fixed-length records, each of
  1160.     which is 200 characters wide, you could specify it like this:
  1161.  
  1162.         CHOP 1 200
  1163.  
  1164.     If the input record is more than 255 characters, you must break it up into
  1165.     smaller chunks.  For example, if the input record was 300 characters wide,
  1166.     you could break it up like this:
  1167.  
  1168.         CHOP 1 250, 251 300
  1169.  
  1170.     By using CHOP, Parse-O-Matic can handle input records up to 32767
  1171.     characters wide.  You can use the $SPLIT variable to manage your use of
  1172.     CHOP.  See the example in the section describing the SPLIT command.
  1173.                               
  1174.  
  1175.                                  ------------------
  1176.                                  The LOOKUP Command
  1177.                                  ------------------
  1178.  
  1179.     FORMAT:  LOOKUP var1 value1
  1180.  
  1181.     The LOOKUP command will search for value1 in a text file (the name of which
  1182.     is specified either by the LOOKFILE command or the /L startup parameter).
  1183.     When POM finds it, it sets var1 to another value found on the same line.
  1184.  
  1185.     Let us suppose you created a text file, named NAMES.TBL, like this:
  1186.                     
  1187.         R. REAGAN        Ronald Reagan
  1188.         D. EISENHOWER    Dwight Eisenhower
  1189.         G. BUSH          George Bush
  1190.         :                :
  1191.         Column 1         Column 18
  1192.  
  1193.     This file can be used to look up a name, as in this POM file:
  1194.  
  1195.         LOOKFILE "NAMES.TBL"
  1196.         LOOKCOLS "1" "17" "18" "34"
  1197.         SET      oldname = $FLINE[21 37]
  1198.         TRIM     oldname "R" " "
  1199.         LOOKUP   newname = oldname
  1200.         OUTEND   |{oldname} {newname}
  1201.  
  1202.     The LOOKFILE command specifies the name of the look-up file.  The LOOKCOLS
  1203.     command specifies the starting and end columns for both the "text-to-look-
  1204.     for" field (known as the key field) and the "text-to-replace-with" field
  1205.     (known as the data field).
  1206.  
  1207.     The LOOKUP command will look for oldname in NAMES.TBL.  If oldname is set
  1208.     to "G. BUSH", LOOKUP sets newname to "George Bush".  If, however, oldname
  1209.     is set to "G. WASHINGTON", which doesn't appear in NAMES.TBL, newname
  1210.     is set to "" (that is to say, an empty string).
  1211.  
  1212.     There is no limit to the number of lines that you can put in a look-up
  1213.     file.  However, the more lines there are, the longer it will take to
  1214.     process (because there is more to search).  The maximum length of a line
  1215.     in a look-up file is 255 characters.
  1216.  
  1217.     In the look-up file, null (empty) lines are ignored.  You can also include
  1218.     comments in the file by starting the line with a semi-colon:
  1219.  
  1220.         ; Some of the Presidents of the United States
  1221.         R. REAGAN        Ronald Reagan
  1222.         D. EISENHOWER    Dwight Eisenhower
  1223.         G. BUSH          George Bush
  1224.  
  1225.     The LOOKUP command can be used for more than just names, of course.  You
  1226.     could use it to look up prices, phone numbers, addresses and so on.
  1227.  
  1228.  
  1229.                                 --------------------
  1230.                                 The LOOKFILE Command
  1231.                                 --------------------
  1232.  
  1233.     FORMAT:  LOOKFILE value1
  1234.  
  1235.     The LOOKFILE command specifies the name of the look-up file for the next
  1236.     LOOKUP command.  This lets you use several look-up files in one POM file.
  1237.     For example:
  1238.  
  1239.         SET name = $FLINE[1 20]
  1240.         ; Look up full name
  1241.         LOOKFILE "NAMES.TBL"
  1242.         LOOKCOLS "1" "25" "30" "50"
  1243.         LOOKUP   fullname = name
  1244.         ; Look up phone number
  1245.         LOOKFILE "PHONE.TBL"
  1246.         LOOKCOLS "1" "25" "30" "40"
  1247.         LOOKUP   phone = name
  1248.         ; Output result
  1249.         OUTEND   |{name} {fullname} {newname}
  1250.  
  1251.     If you only have one look-up file, you may omit the LOOKFILE command and
  1252.     specify the file name on the command line, using the /L parameter.  For
  1253.     example, you could write a POM file like this:
  1254.  
  1255.         SET name = $FLINE[1 20]
  1256.         ; Look up full name
  1257.         LOOKCOLS "1" "25" "30" "50"
  1258.         LOOKUP   fullname = name
  1259.         ; Output result
  1260.         OUTEND   |{name} {fullname}
  1261.  
  1262.     Your POM command could then look like this:
  1263.  
  1264.         POM MYPOM.POM INPUT.TXT OUTPUT.TXT /LC:\MYFILES\NAMES.TBL
  1265.  
  1266.     This technique allows you to use several different look-up files with the
  1267.     same POM file, simply by changing the command line.
  1268.                              
  1269.  
  1270.                                 --------------------
  1271.                                 The LOOKCOLS Command
  1272.                                 --------------------
  1273.  
  1274.     FORMAT:  LOOKCOLS value1 value2 value3 value4
  1275.  
  1276.     The LOOKCOLS command specifies the starting and ending columns for the
  1277.     key and data fields in a look-up file (see the explanation of the LOOKUP
  1278.     command for an overview of look-up files).
  1279.  
  1280.         value1 specifies the starting column for the key  field
  1281.         value2 specified the  ending  column for the key  field
  1282.         value3 specifies the starting column for the data field
  1283.         value4 specified the  ending  column for the data field
  1284.  
  1285.     You can specify a null value to indicate "same as last time".  For example:
  1286.  
  1287.         SET name = $FLINE[1 20]
  1288.         LOOKFILE "NAMES.TBL"
  1289.         LOOKCOLS "1" "25" "30" "50"
  1290.         LOOKUP   fullname = name
  1291.         LOOKFILE "PHONE.TBL"
  1292.         LOOKCOLS "" "" "" "40"
  1293.         LOOKUP   phonenum = name
  1294.         OUTEND   |{name} {fullname} {phonenum}
  1295.  
  1296.     The second LOOKCOLS command uses the same numbers for the first three
  1297.     values that the first LOOKCOLS command used.
  1298.  
  1299.     If you do not specify a LOOKCOLS command, the default values are:
  1300.  
  1301.        Key Field:   Starting column  =   1
  1302.                     Ending column    =  10
  1303.        Data Field:  Starting column  =  12
  1304.                     Ending column    = 255
  1305.  
  1306.     This is equivalent to LOOKCOLS "1" "10" "12" "255".
  1307.  
  1308.  
  1309.                                 --------------------
  1310.                                 The LOOKSPEC Command
  1311.                                 --------------------
  1312.  
  1313.     FORMAT:  LOOKSPEC value1 value2 value3
  1314.  
  1315.     The LOOKSPEC command configures the way the next LOOKUP command will work.
  1316.                                                 
  1317.         value1 = Trim             ("Y" or "N" -- default "Y")
  1318.         value2 = Sorted           ("Y" or "N" -- default "N")
  1319.         value3 = Case-sensitive   ("Y" or "N" -- default "N")
  1320.  
  1321.     The Trim setting specifies whether or not the data field should have spaces
  1322.     stripped off both ends.
  1323.  
  1324.     The Sorted setting specifies whether or not the look-up file is sorted by
  1325.     the key field.  A sorted file is much faster than an unsorted file.  This
  1326.     is especially noticeable if you have a large look-up file and a lot of
  1327.     input to process.
  1328.  
  1329.     The Case-sensitive setting specifies whether or not LOOKUP should distin-
  1330.     guish between upper and lower case when searching.  The default setting is
  1331.     "N" (No), so that LOOKUP would find "John Smith", even if it appeared in
  1332.     the look-up file as "JOHN SMITH".  It is usually safest to set Case-
  1333.     sensitivity to "N", but if you set it to "Y", searching is slightly faster.
  1334.  
  1335.     You can specify a null value to indicate "same as last time".  For example:
  1336.  
  1337.         SET name = $FLINE[1 20]
  1338.         LOOKFILE "DATA.TBL"
  1339.         LOOKCOLS "1" "25" "30" "50"
  1340.         LOOKSPEC "Y" "Y" "Y"
  1341.         LOOKUP   fullname = name
  1342.         LOOKCOLS "" "" "60" "70"
  1343.         LOOKSPEC "N" "" ""
  1344.         LOOKUP   phonenum = name
  1345.         OUTEND   |{name} {fullname} {phonenum}
  1346.  
  1347.     The second LOOKSPEC command uses the same settings for Sorted and Case-
  1348.     sensitivity as the first one, but specifies a different Trim setting.
  1349.  
  1350.  
  1351.                                  -----------------
  1352.                                  The TRACE Command
  1353.                                  -----------------
  1354.  
  1355.     FORMAT:  TRACE var1
  1356.  
  1357.     The TRACE command is an alternative to standard tracing (see "Tracing", in
  1358.     the "Terms and Techniques" section).
  1359.  
  1360.     When you include a TRACE command in your POM file, Parse-O-Matic will
  1361.     create a text file, named POM.TRC, and use it to keep a detailed record of
  1362.     POM's processing.  Here is an example of the TRACE command:
  1363.  
  1364.     TRACE PRICE
  1365.  
  1366.     This traces the variable named "PRICE".  After processing, the file POM.TRC
  1367.     will show everything that happened, and give the value of PRICE at the
  1368.     TRACE line.
  1369.  
  1370.     NOTE:  Since trace files are so detailed, they can be very large.  If you
  1371.     are trying to debug a POM file using TRACE, it is a good idea to use a
  1372.     small input file.
  1373.  
  1374.  
  1375.  
  1376.     ===========================================================================
  1377.                                 TERMS AND TECHNIQUES
  1378.     ===========================================================================
  1379.  
  1380.  
  1381.                                        ------
  1382.                                        VALUES
  1383.                                        ------
  1384.  
  1385.     A value can be specified in the following ways:
  1386.  
  1387.         "text"              A literal text string
  1388.         #number             A single ASCII character (e.g. #32 = Space)
  1389.         #number#number...   Several ASCII characters (e.g. #32#32 = 2 Spaces)
  1390.         VARNAME             The name of a variable
  1391.         VARNAME[start end]  A substring of a variable
  1392.         VARNAME[start]      A single character
  1393.         VARNAME+            Incremented variable (see explanation below)
  1394.  
  1395.     Variable names can be up to 8 characters long.  There is no distinction
  1396.     between upper and lower case in the variable name.  You can create up to
  1397.     220 variables and literals.
  1398.  
  1399.     The # character is used to specify a literal text string of one or more
  1400.     characters.  Follow each # with the decimal value of the ASCII character
  1401.     you want.  Here are some useful values:
  1402.  
  1403.         #10 = Line Feed   #12 = Form Feed   #13 = Carriage Return
  1404.  
  1405.     Parse-O-Matic predefines several variables.  They are:
  1406.  
  1407.         $FLINE = The line just read from the file (max. length 255 characters)
  1408.         $FLUPC = The line just read from the file, in uppercase
  1409.         $BRL   = The { character (used in OUT)
  1410.         $BRR   = The } character (used in OUT)
  1411.         $TAB   = The tab character (Hex $09; ASCII 09)
  1412.         $SPLIT = The CHOP or SPLIT number you are currently processing
  1413.  
  1414.     Since $FLINE has a maximum length of 255 characters, you will have to use
  1415.     the SPLIT or CHOP command if your input file is wider than that.  The
  1416.     $SPLIT variable reports which segment you are processing.  For example,
  1417.     if you had this command...
  1418.  
  1419.       CHOP 1 255, 256 380
  1420.  
  1421.     then $SPLIT would be set to "1" when it was processing columns 1 to 255,
  1422.     and it would be set to "2" when it was processing columns 256 to 380.
  1423.  
  1424.  
  1425.                                      ----------
  1426.                                      DELIMITERS
  1427.                                      ----------
  1428.  
  1429.     If you need to specify a quotation mark, use "".  For example:
  1430.  
  1431.         IGNORE $FLINE = "He said ""Hello"" to me."
  1432.  
  1433.     This ignores any line containing:  He said "Hello" to me.
  1434.  
  1435.  
  1436.                                  ------------------
  1437.                                  ILLEGAL CHARACTERS
  1438.                                  ------------------
  1439.  
  1440.     No command can contain these ASCII characters:
  1441.  
  1442.         HEX   DECIMAL   NAME
  1443.         ---   -------   --------------------
  1444.         $00      0      NULL
  1445.         $0A     10      LF (Linefeed)
  1446.         $0D     13      CR (Carriage Return)
  1447.  
  1448.     Of course, LF and CR do appear at the end of each line, in a text file.
  1449.  
  1450.  
  1451.                                     -----------
  1452.                                     COMPARATORS
  1453.                                     -----------
  1454.  
  1455.     The ACCEPT, BEGIN, IF, IGNORE, OUT and OUTEND commands each decide what to
  1456.     do by comparing two values.  For example:
  1457.  
  1458.         IF $FLINE[1 3] = "XYZ" THEN x = "3" ELSE "4"
  1459.  
  1460.     In this example, if the first three characters of $FLINE are "XYZ", the
  1461.     variable x is set to "3", otherwise it is set to "4".  The first equals
  1462.     sign ("=") is a "comparator", because it defines how two values will be
  1463.     compared.  The second equals sign is not a comparator; it is simply
  1464.     padding, which makes the line easier to understand (see the section
  1465.     "Padding for Clarity" for details).
  1466.  
  1467.     Parse-O-Matic allows the following comparators:
  1468.  
  1469.     COMPARATOR MEANING            EXAMPLE
  1470.     ---------- ------------------ ---------------------------------------------
  1471.     <>         Does not equal     IF name <> "Fred" THEN z = "This is not Fred"
  1472.     =          Equals             IF numeral = "IV" THEN x = "4"
  1473.     >          More than          IF x >  "4" THEN z = "x is more than four"
  1474.     >=         More than or equal IF x >= "4" THEN z = "x is four or more"
  1475.     <          Less than          IF x <  "4" THEN z = "x is less than four"
  1476.     <=         Less then or equal IF x <= "4" THEN z = "x is four or less"
  1477.     ^          Contains           IF x ^  "4" THEN z = "x contains a four"
  1478.     LONGER     Length is longer   IF x LONGER  y THEN z = "x is longer than y"
  1479.     SHORTER    Length is shorter  IF x SHORTER y THEN z = "x is shorter than y"
  1480.     SAMELEN    Length is the same IF x SAMELEN y THEN z = "Same length as y"
  1481.  
  1482.     Whenever a comparator is required, but is omitted, it is assumed to be
  1483.     "equals".  Thus, the following lines are equivalent:
  1484.  
  1485.         IF x y z "3" "4"                   (This is very terse, but it works)
  1486.         IF x   y THEN z = "3" ELSE "4"     (The "equals" comparator is omitted)
  1487.         IF x = y THEN z = "3" ELSE "4"     (This is a lot easier to read)
  1488.  
  1489.     Comparators work on numeric and alphabetic data.  Here are some samples:
  1490.  
  1491.                    "ABC" <>      "ABCD"      "3" <>      "4"
  1492.                    "ABC" <=      "ABCD"      "3" <=      "4"
  1493.                    "ABC" <       "ABCD"      "3" <       "4"
  1494.                    "ABC" SHORTER "ABCD"      "3" SAMELEN "4"
  1495.  
  1496.                    "ABC" >=      "ABC"       "ABC" <>      "CDE"
  1497.                    "ABC" <=      "ABC"       "ABC" <=      "CDE"
  1498.                    "ABC" =       "ABC"       "ABC" <       "CDE"
  1499.                    "ABC" ^       "ABC"       "ABC" SAMELEN "CDE"
  1500.                    "ABC" SAMELEN "ABC"
  1501.  
  1502.     IF YOU USED PARSE-O-MATIC PRIOR TO VERSION 3.00:  Because the comparator
  1503.     defaults to "equals" if it is omitted, POM files created before version
  1504.     3.00 will continue to function normally -- with two notable exceptions.
  1505.     In older versions, the IGNORE and ACCEPT commands defaulted to "contains".
  1506.     If you have POM files that were created for older versions, you should
  1507.     check your IGNORE and ACCEPT commands to ensure that they are doing what
  1508.     you want them to.
  1509.  
  1510.  
  1511.                                     ------------
  1512.                                     INCREMENTING
  1513.                                     ------------
  1514.  
  1515.     Only numeric incrementing is supported.  Attempting to increment another
  1516.     type of variable will result in an error.
  1517.  
  1518.     - Incrementing "1" gives you "2"
  1519.     - Incrementing "9" gives you "10"
  1520.  
  1521.     The first time a variable is referenced, it has a null value.  If you
  1522.     increment this, it will be changed from "" (i.e.  null) to "1".
  1523.  
  1524.  
  1525.                                    -------------
  1526.                                    LINE COUNTERS
  1527.                                    -------------
  1528.  
  1529.     If your input record is divided over several lines (due to its original
  1530.     format or perhaps because you used the SPLIT or CHOP command), it is
  1531.     helpful to set up a line counter.  The following example extracts the first
  1532.     six characters of the second line of input records that span three lines
  1533.     (designated lines 0, 1 & 2):
  1534.  
  1535.         IF     LineCntr = "1" THEN MyField = $FLINE[1 6]
  1536.         OUTEND LineCntr = "1" |{MyField}
  1537.         IF     LineCntr = "2" THEN LineCntr = "" ELSE LineCntr+
  1538.  
  1539.  
  1540.                                       -------
  1541.                                       TRACING
  1542.                                       -------
  1543.  
  1544.     By setting the DOS variable POM to ALL, you can generate a trace file,
  1545.     named POM.TRC.  This is helpful if you have trouble understanding why your
  1546.     file isn't being parsed properly.  But be sure to test it with a SMALL
  1547.     input file; the trace is quite detailed, and it can easily generate a huge
  1548.     output file.
  1549.  
  1550.     To save space, you can specify a particular list of variables to be traced,
  1551.     rather than tracing everything.  For example, to trace only the variable
  1552.     PRICE, enter this DOS command:
  1553.  
  1554.         SET POM=PRICE
  1555.  
  1556.     To trace several variables, separate the variable names by slashes, as in
  1557.     this example:
  1558.  
  1559.         SET POM=PRICE/BONUS/NAME
  1560.  
  1561.     This traces the three variables PRICE, BONUS and NAME.
  1562.  
  1563.  
  1564.                                      ----------
  1565.                                      QUIET MODE
  1566.                                      ----------
  1567.  
  1568.     Sometimes you don't want the user to see the Parse-O-Matic processing
  1569.     screen.  In such cases, you can use the "Quiet Mode" switch (/Q) on the
  1570.     command line.  For example:
  1571.  
  1572.         POM XYZ.POM MYFILE.TXT TEMP.TXT /Q
  1573.  
  1574.     The /Q switch suppresses the display of the processing screen.  The only
  1575.     time a user will see anything is if there is a problem (for example:  the
  1576.     input file was not found).    
  1577.  
  1578.                                      ---------
  1579.                                      DBF FILES
  1580.                                      ---------
  1581.  
  1582.     If Parse-O-Matic notices that the input file is a "DBase" file (i.e. it has
  1583.     a DBF extension -- for example:  MYFILE.DBF), it will change the way it
  1584.     processes the data.  For instance, the variable $FLINE is not defined.
  1585.     Rather, each of the fields in the database are pre-parsed.  Thus, if you
  1586.     have a DBF file containing three fields (EMPNUM, NAME, PHONE), your entire
  1587.     POM file might look like this:
  1588.  
  1589.         IGNORE DELETED "Y"
  1590.         OUTEND |{EMPNUM} {NAME} {PHONE}
  1591.  
  1592.     The DELETED variable is created automatically for each record.  If it is
  1593.     set to "Y", it means the record has been deleted from the database and is
  1594.     probably not valid.  In most cases, you will want to ignore such records.
  1595.  
  1596.     If you do not know what the field names are, you can obtain the list with
  1597.     the following POM file:
  1598.  
  1599.         TRACE DELETED
  1600.  
  1601.     Afterwards, when you inspect the trace file (POM.TRC), you will see a
  1602.     summary of all the fields.  Since there are no output commands (e.g. OUTEND
  1603.     and OUTHDG), the output file will be empty.
  1604.  
  1605.     NOTE:  Parse-O-Matic does not currently support DBF "Memo" fields.
  1606.  
  1607.  
  1608.                           --------------------------------
  1609.                           CONVERTING COMMA-DELIMITED FILES
  1610.                           --------------------------------
  1611.  
  1612.     As explained in the section "The PARSE Command", Parse-O-Matic can convert
  1613.     comma-delimited files to columnar format.  However, if you are frequently
  1614.     faced with this task, you may find it easier to use Pinnacle Software's
  1615.     CCDF utility.  When you register Parse-O-Matic, we will send you an
  1616.     evaluation copy of CCDF.  If you are in a hurry, you can download a copy
  1617.     from our free files BBS at 514-345-8654.  (Sign on as GUEST -- no password
  1618.     needed -- and enter the command GET CCDF to start downloading the file
  1619.     CCDF.ZIP.  The default download protocol is ZMODEM, but you can change this
  1620.     with the PROTOCOL command.)
  1621.  
  1622.                                       --------
  1623.                                       EXAMPLES
  1624.                                       --------
  1625.  
  1626.     Most of these techniques are demonstrated by the examples provided with the
  1627.     standard Parse-O-Matic package.  To see these examples, switch to your
  1628.     Parse-O-Matic directory and type START at the DOS prompt.
  1629.  
  1630.  
  1631.  
  1632.     ===========================================================================
  1633.                                      LICENSING
  1634.     ===========================================================================
  1635.  
  1636.     This product is available in several versions:
  1637.  
  1638.     SHAREWARE:  Shareware means that you are entitled to evaluate this program
  1639.     at no cost for a reasonable period (about 45 days).  If you continue to use
  1640.     it after that, you are required to purchase a registered copy (see below).
  1641.  
  1642.     REGISTERED:  When you register a shareware copy of this product, you will
  1643.     receive the latest version, plus an unlocking code that will let you
  1644.     register any new shareware versions that we release for a period of two
  1645.     years. The file OPTIONS.DOC explains the various payment methods available.
  1646.     A registered copy provides you with a single-user license.
  1647.  
  1648.     SITE/MULTI-COPY LICENSES:  If you plan to run 15 or more copies of this
  1649.     program simultaneously (on a network or on separate computers), you can
  1650.     obtain quantity pricing.  See the order form (file ORDER.FRM) for details.
  1651.  
  1652.     DISTRIBUTION LICENSE:  The distribution license ($750) allows you to use an
  1653.     unlimited number of copies of a specially personalized copy.  You may
  1654.     include it in a commercial package as a utility.  The only restriction is
  1655.     that you may not distribute this document (i.e. the user manual) or its
  1656.     essential content.  With this safeguard, we avoid placing ourselves in
  1657.     competition with you; the program must be used to support a product rather
  1658.     than being a main selling feature.
  1659.  
  1660.     RETAIL LICENSE:  You can sell complete, registered copies of this product,
  1661.     complete with documentation, in return for royalties.  The terms depend on
  1662.     volume and advance payments. The license is $100 plus the following royalty
  1663.     scale:
  1664.                                  
  1665.     Non-exclusive, prepayment for  1,000 copies ------------------- $1.00/copy
  1666.     Non-exclusive, prepayment for  5,000 copies ------------------- $0.50/copy
  1667.     Non-exclusive, prepayment for 10,000 copies ------------------- $0.30/copy
  1668.     Non-exclusive, prepayment for 25,000 copies ------------------- $0.20/copy
  1669.     Non-English exclusive, 10,000 copy prepayment ----------------- $0.35/copy
  1670.     Non-English exclusive, 25,000 copy prepayment ----------------- $0.25/copy
  1671.  
  1672.     In the above rate schedule, packaging, product duplication and support are
  1673.     the responsibility of the retailer.  For non-English versions, we have a
  1674.     team available which can handle language conversions (this service is
  1675.     priced separately).  If you wish to obtain a retail license, please contact
  1676.     us to request the retail license contract appropriate to your requirements.
  1677.  
  1678.  
  1679.